On Termination, Confluence and Consistent CHR-based Type Inference
نویسندگان
چکیده
We consider the application of Constraint Handling Rules (CHR) for the specification of type inference systems, such as that used by Haskell. Confluence of CHR guarantees that the answer provided by type inference is correct and consistent. The standard method for establishing confluence relies on an assumption that the CHR program is terminating. However, many examples in practice give rise to non-terminating CHR programs, rendering this method inapplicable. Despite no guarantee of termination or confluence, the Glasgow Haskell Compiler (GHC) supports options that allow the user to proceed with type inference anyway, e.g. via the use of the UndecidableInstances flag. In this paper we formally identify and verify a set of relaxed criteria, namely range-restrictedness, local confluence, and ground termination, that ensure the consistency of CHR-based type inference that maps to potentially non-terminating CHR programs.
منابع مشابه
Operational Semantics and Confluence of Constraint Propagation Rules
Constraint Handling Rules (CHR) allow one to specify and implement both propagation and simpliication for user-deened constraints. Since a propagation rule is applicable again and again, we present in this paper for the rst time an operational semantics for CHR that avoids the termination problem with propagation rules. In previous work AFM96], a suucient and necessary condition for the connuen...
متن کاملOn Confluence of Non-terminating CHR Programs
Confluence is an important property for any kind of rewrite system including CHR, which is a general-purpose declarative committedchoice language consisting of multi-headed guarded rules. CHR can yield a confluence problem, because of non-determinism in the choice of rules using the abstract semantics. Confluence in CHR is an ongoing research topic, because it provides numerous benefits for imp...
متن کاملAnalyses, Optimizations and Extensions of Constraint Handling Rules: Ph.D. Summary
This is a summary of the Ph.D. thesis of Tom Schrijvers [4]. Constraint Handling Rules (CHR) [3] is a rule-based language commonly embedded in a host language. It combines elements of Constraint Logic Programming and term rewriting. Several implementations of CHR exist: in Prolog, Haskell, Java and HAL. Typical applications of CHR are in the area of constraint solving, but currently CHR is also...
متن کاملClausal Resolution for Modal Logics of Confluence – Extended Version∗
We present a clausal resolution-based method for normal multimodal logics of confluence, whose Kripke semantics are based on frames characterised by appropriate instances of the Church-Rosser property. Here we restrict attention to eight families of such logics. We show how the inference rules related to the normal logics of confluence can be systematically obtained from the parametrised axioms...
متن کاملUsing Program Analysis for Integration and Optimization of Rule-based Constraint Solvers
ABSTRACT. One lesson learned from practical applications is that constraints are often heterogeneous. Solving such constraints requires a collaboration of constraint solvers. In this paper, we introduce a methodology for the tight integration of CHR constraint solver programs into one such program. CHR is a high-level rule-based language for writing constraint solvers and reasoning systems. A c...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید
ثبت ناماگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید
ورودعنوان ژورنال:
- TPLP
دوره 14 شماره
صفحات -
تاریخ انتشار 2014